<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>05_弹性盒子-水平垂直居中-方法1</title>
        <style>

            html,body {
                width: 100%;
                height: 100%;
            }

            body {
                margin: 0;
                display: flex;

                justify-content: center;
                align-items: center;

            }

            div {
                width: 200px;
                height: 200px;
                background-color: aqua;
            }

        </style>
    </head>
    <body>
        <div></div>
    </body>
</html>